package ccmis.finance.capital.bo;

import java.util.List;

import javax.ejb.EJB;
import javax.ejb.Local;
import javax.ejb.Stateless;

import jfox.platform.infrastructure.DataAccessObject;
import jfox.platform.infrastructure.SuperBO;

import ccmis.finance.capital.dao.LendContractDAO;
import ccmis.finance.capital.entity.LendContract;

/**
 * @author <a href="mailto:ren.yingb@gmail.com">Ren Yingbo</a>
 */
@Stateless
@Local
public class LendContractBOBean extends SuperBO implements LendContractBO {
	
	@EJB
	LendContractDAO lendContractDAO;
 
	public void deleteLendContract(long id) {
		lendContractDAO.deleteLendContract(id);		
	}

	public List<LendContract> getAllLendContracts() {
		return lendContractDAO.getAllLendContracts();
	}

	public LendContract getLendContractById(long id) {	
		return lendContractDAO.getLendContractById(id);
	}

	public void newLendContract(LendContract lendContract) {
		lendContractDAO.insertLendContract(lendContract);	
	}

	public void updateLendContract(LendContract lendContract) {
		lendContractDAO.updateLendContract(lendContract);
	}

	
	public DataAccessObject getDataAccessObject() {
		return lendContractDAO;
	}

}
